<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1{
            font-size: 50px;
            /* text-decoration
               设置文本修饰
               none 没有
               underline 下划线
               line-through 删除线
               overline 上划线
             */
             text-decoration: underline red;
        }

        /* 文本显示省略号  */
        .box2{
            width: 200px;
            /* white-spance 设置网页如何处理换行
               可选值
                normal
                nowrap 不换行
                pre 保留空白

             */
            white-space: nowrap;
            overflow: hidden;
            /* 文本溢出显示省略号 */
            text-overflow: ellipsis;
        }
    </style>
</head>
<body>
    <div class="box1">今天天气真不错</div>
    <div class="box2">
        ddjfjdif djfljalfi djlfajfoasefppof djfjdif djfljalfi djlfajfoasefppof djfjdif djfljalfi djlfajfoasefppof 
    </div>
</body>
</html>